import time
import os

from grabscreen import grab_screen
from config import x1, y1, x2, y2

if __name__ == '__main__':

    save_folder = r'F:\workspace\data'

    for i in range(50):
        time.sleep(1)
        img0 = grab_screen(region=(x1, y1, x2, y2))
        img0.imwrite(os.path.join(save_folder, str(int(time.time()*10000))+'.jpg'), img0)
